import Vue from "vue"
import VueRouter from "vue-router"

// 引入组件

import login from './page/login.vue'
import home from './page/home.vue'
import notFound from './page/404.vue'
import menutab from './page/menu1/menuTab.vue'
import menutable from './page/menu2/menuTable.vue'
import detail from './page/menu2/UserDetail.vue'

Vue.use(VueRouter);// 要告诉 vue 使用 vueRouter

let routes = [{
        path: '/login',
        component: login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: notFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: home,
        name: '导航一',
        iconCls: 'el-icon-message', //图标样式class
        children: [{
            path: '/menutab',
            component: menutab,
            name: '角色'
        }]
    },
    {
        path: '/',
        component: home,
        name: '导航二',
        iconCls: 'fa fa-id-card-o',
        children: [{
                path: '/menutable',
                component: menutable,
                name: '用户管理'
            }
        ]
    },
    {
        path: '/UserDetail',
        component: detail,
        name: '详情',
        hidden: true
    },
];
var router = new VueRouter({
    routes//这里可以带有路由器的配置参数
})
export default router;//将路由器导出